package memorphic.slide
{
	import flash.events.Event;

	public class StateEvent extends Event
	{
		
		public static const STATE_CHANGE:String = "stateChange";
		public static const BEFORE_STATE_CHANGE:String = "beforeStateChange";
		
		public static const ENTER_FROM_ANY_STATE:String = "enterFromAnyState";
		public static const ENTER_FROM_PARENT_STATE:String = "enterFromParentState";
		public static const ENTER_FROM_CHILD_STATE:String = "enterFromChildState";
		public static const ENTER_FROM_UNRELATED_STATE:String = "enterFromUnrelatedState";
		public static const EXIT_TO_ANY_STATE:String = "exitToAnyState";
		public static const EXIT_TO_PARENT_STATE:String = "exitToParentState";
		public static const EXIT_TO_CHILD_STATE:String = "exitToChildState";
		public static const EXIT_TO_UNRELATED_STATE:String = "exitToUnrelatedState";
		
		
		public var oldState:String;
		public var newState:String;
		
		public function StateEvent(type:String, newState:String, oldState:String, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
			this.oldState = oldState;
			this.newState = newState;
		}
		
		public override function clone():Event
		{
			return new StateEvent(type, newState, oldState, bubbles, cancelable);
		}
	}
}